<?php
namespace app\process;

use support\Log;
use Workerman\Crontab\Crontab;
use app\services\ExampleService;

class CrontabSixtyProcess
{
    public function onWorkerStart()
    {
        // 每60分钟的第一秒执行
        new Crontab('0 60 * * * *', function(){
            try{
                ExampleService::sixty() ;
            }catch(\Exception $e){
                Log::error(__METHOD__, []) ;
            }
        });
    }
}